#@layout()
#define script()
<script src="#(CPATH)/static/components/ckeditor5/ckeditor.js"></script>
#end

#define css()
<style>
    .ck-editor__editable_inline {
        min-height: 300px;
    }
</style>
#end


#define content()

    <section class="content-header">


        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-6">

                    <div class="row mb-2">
                        <div class="col-sm-12">
                            <h1>
                                评论编辑
                                <small data-toggle="tooltip" title="" data-placement="right"
                                       data-trigger="hover"><i class="nav-icon far fa-question-circle"></i></small>
                                <small> 首页 / 评论 / 编辑</small>
                            </h1>
                        </div>
                    </div>
                </div>
            </div>

        </div><!-- /.container-fluid -->

    </section>

    <section class="content">

        <div class="container-fluid">
                <div class="card card-outline card-primary">

                    <!-- /.card-header -->
                    <!-- form start -->
                    <form class=" form-setting autoAjaxSubmit" autocomplete="off"
                          method="post"
                          action="#(CPATH)/admin/article/comment/doSave"
                          data-ok-message="保存成功">
                        <div class="card-body">

                            <input type="hidden" name="comment.id" value="#(comment.id ??)">

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">内容</label>

                                <div class="col-sm-8">
                                     <textarea class="form-control" id="editor1" data-render="ckeditor" name="comment.content" >#(comment.content ??)</textarea>
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">用户昵称</label>

                                <div class="col-sm-6">
                                    <input type="input" class="form-control" placeholder="用户昵称..."
                                           name="comment.author" value="#(comment.author ??)">
                                </div>
                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">状态</label>

                                <div class="col-sm-6">
                                    <select class="form-control" name="comment.status">
                                        <option value="normal" #selectedIf(comment.status==
                                        'normal')>正常</option>
                                        <option value="unaudited" #selectedIf(comment.status==
                                        'unaudited')>冻结</option>
                                        <option value="trash" #selectedIf(comment.status==
                                        'trash')>垃圾箱</option>
                                    </select>
                                </div>

                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">"顶" 数量</label>

                                <div class="col-sm-6">
                                    <input type="input" class="form-control" placeholder=""
                                           name="comment.vote_up" value="#(comment.vote_up ??)">
                                </div>

                            </div>

                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">"踩" 数量</label>

                                <div class="col-sm-6">
                                    <input type="input" class="form-control" placeholder=""
                                           name="comment.vote_down" value="#(comment.vote_down ??)">
                                </div>

                            </div>


                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">评论时间</label>

                                <div class="col-sm-6">
                                    <input type="input" class="form-control datetime" placeholder=""
                                           name="comment.created" value="#date(comment.created ??)">
                                </div>
                            </div>

                        </div>
                        <!-- /.card-body -->
                        <div class="card-footer">
                            <div class="offset-sm-2 col-sm-10 submit-block">
                                <div class="card-submit">
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </div>
                            </div>
                        </div>
                        <!-- /.card-footer -->
                    </form>
                </div>
            </div>
        </div>

    </section>

#end
